package com.company;

/**
 * @author Administrator
 * @date 2018/2/24 0024
 */
public class ExcepTest {
    public static void main(String[] args) {
        int[] a = new int[2];
        try {
            System.out.println("Access element three: " + a[3]);
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("Exception thrown :" + e);
        } finally {
            a[0] = 6;
            System.out.println("First element value:" + a[0]);
            System.out.println("The finally statement is executed");
        }
    }
}
